package com.kksoft.readcm.b;

import com.kksoft.readcm.a.Appconfig;
import com.kksoft.readcm.activity.App;
import com.kksoft.readcm.objects.j;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class i extends m
{
  protected final j a;
  protected final h b;
  protected String c;
  private String d;
  private URL e;
  private Map f;

  public i(h paramh, String paramString1, String paramString2, j paramj)
  {
    super(2);
    this.b = paramh;
    if (paramString2 == null)
    {
      String str1 = this.b.s();
      this.d = str1;
    }
    while (true)
    {
      Object localObject = null;
      try
      {
        String str2 = this.d;
        URL localURL = new URL(str2);
        localObject = localURL;
        //this.e = localObject;
        this.a = paramj;
        this.c = paramString1;
        HashMap localHashMap = new HashMap();
        this.f = localHashMap;
        return;
        //this.d = paramString2;
      }
      catch (MalformedURLException localMalformedURLException)
      {
        while (true)
          App.b(localMalformedURLException);
      }
    }
  }

  private j a(String paramString, int paramInt)
  {
    Object localObject1;
    if ((paramString == null) || (paramString.contains("RIL_assets")))
      localObject1 = null;
    while (true)
    {
      //return localObject1;
      localObject1 = (j)this.f.get(paramString);
      if (localObject1 != null)
        continue;
      localObject1 = this.e;
      if (paramInt == 2);
      int j;
      for (int i = 1; ; j = 0)
      {
        Appconfig localaf = this.b.D();
        //localObject1 = j.a(paramString, (URL)localObject1, paramInt, i, localaf);
        if (localObject1 != null)
         // break label85;
        localObject1 = null;
        break;
      }
     // label85: Object localObject2 = this.f.put(paramString, localObject1);
      if ((this.b == null) || (this.b.o()))
        continue;
      this.b.a((j)localObject1, paramInt);
    }
  }

  private static String a(Matcher paramMatcher, String paramString, int paramInt, boolean paramBoolean)
  {
    if (paramBoolean);
    for (Object localObject1 = "\"".concat(paramString).concat("\""); ; localObject1 = paramString)
    {
      Object localObject2 = paramMatcher.group(1);
      String str1 = paramMatcher.group(paramInt);
      //StringBuilder localStringBuilder = new java/lang/StringBuilder;
//      if (localObject2 != null)
//      {
//        String str2 = String.valueOf(localObject2);
//        localStringBuilder.<init>(str2);
//        localObject1 = localStringBuilder.append((String)localObject1);
//        if (str1 == null)
//          break label91;
//      }
//      label91: for (localObject2 = str1; ; localObject2 = "")
//      {
//        return (String)localObject2;
//        localObject2 = "";
//        break;
//      }
    }
  }

  protected void a()
  {
  }

  protected final void a(int paramInt, j paramj)
  {
//    Object localObject1 = null;
//    int i = 2;
//    if (this.c == null);
//    int j;
//    while (true)
//    {
//      return;
//      j = 0;
//      switch (paramInt)
//      {
//      default:
//      case 1:
//      case 2:
//      }
//    }
//    Pattern localPattern1 = Pattern.compile("(<\\s?(?:img|input|table|td)[\\s\\n]*(?:[^>]*)?(?:src|background)=[\"'])([^\"']*)([\"'])", 2);
//    int k = 3;
//    localObject1 = localPattern1;
//    int m = k;
//    label61: String str1 = this.c;
//    localObject1 = ((Pattern)localObject1).matcher(str1);
//    StringBuffer localStringBuffer1 = new StringBuffer();
//    do
//    {
//      if ((!((Matcher)localObject1).find()) || (this.q.get()))
//      {
//        StringBuffer localStringBuffer2 = ((Matcher)localObject1).appendTail(localStringBuffer1);
//        String str2 = localStringBuffer1.toString();
//        this.c = str2;
//        break;
//        Pattern localPattern2 = Pattern.compile("(background(?:-image)?:[^;}\\(]*url\\()(['\"]?([^'\"\\(\\)]*)['\"]?)(\\))", 2);
//        m = 4;
//        i = 3;
//        localObject1 = localPattern2;
//        j = 1;
//        break label61;
//      }
//      String str3 = ((Matcher)localObject1).group(i);
//      localObject2 = a(str3, 1);
//    }
//    while (localObject2 == null);
//    String str4;
//    if (paramj == null)
//      str4 = ((j)localObject2).b();
//    for (Object localObject2 = "../../".concat(str4); ; localObject2 = ((j)localObject2).a())
//    {
//      String str5 = a((Matcher)localObject1, (String)localObject2, m, j);
//      Matcher localMatcher = ((Matcher)localObject1).appendReplacement(localStringBuffer1, str5);
//      break;
//    }
  }

  protected final void b(int paramInt, j paramj)
  {
//    int i = 3;
//    int j;
//    if (this.c != null)
//      j = 0;
//    Object localObject1;
//    int k;
//    label50: StringBuffer localStringBuffer1;
//    switch (paramInt)
//    {
//    default:
//      return;
//    case 1:
//      localObject1 = Pattern.compile("(<\\s?link[\\s\n]*[^>]*?href=[\"'])([^\"']*)([\"'][^>]*?>)", 2);
//      k = 3;
//      i = 2;
//      String str1 = this.c;
//      localObject1 = ((Pattern)localObject1).matcher(str1);
//      localStringBuffer1 = new StringBuffer();
//    case 2:
//    }
//    do
//    {
//      do
//      {
//        if ((((Matcher)localObject1).find()) && (!this.q.get()))
//          continue;
//        StringBuffer localStringBuffer2 = ((Matcher)localObject1).appendTail(localStringBuffer1);
//        String str2 = localStringBuffer1.toString();
//        this.c = str2;
//        break;
//        Pattern localPattern = Pattern.compile("(@import\\s*(?:url\\()?)(['\"]?([^'\"\\(\\)]*)['\"]?)(\\))?", 2);
//        k = 4;
//        localObject1 = localPattern;
//        j = 1;
//        break label50;
//      }
//      while ((paramInt == 1) && (((Matcher)localObject1).group(1).indexOf("stylesheet") < 0) && (((Matcher)localObject1).group(k).indexOf("stylesheet") < 0));
//      String str3 = ((Matcher)localObject1).group(i);
//      localObject2 = a(str3, 2);
//    }
//    while (localObject2 == null);
//    String str4;
//    if (paramj == null)
//      str4 = ((j)localObject2).b();
//    for (Object localObject2 = "../../".concat(str4); ; localObject2 = ((j)localObject2).a())
//    {
//      String str5 = a((Matcher)localObject1, (String)localObject2, k, j);
//      Matcher localMatcher = ((Matcher)localObject1).appendReplacement(localStringBuffer1, str5);
//      break;
//    }
  }

  protected final void c()
  {
    this.c = null;
    this.f = null;
  }

  public final String d()
  {
    return this.c;
  }

  public final j e()
  {
    return this.a;
  }
}

/* Location:           E:\AndroidDecompiler\jd-gui-0.3.3.windows\newrclasses.dex.dex2jar.jar
 * Qualified Name:     com.kksoft.readcm.b.i
 * JD-Core Version:    0.6.0
 */